<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: 流年 <liu21st@gmail.com>
// +----------------------------------------------------------------------
use Firebase\JWT\Key;
use Firebase\JWT\JWT;
// 应用公共文件
// 异常错误报错级别,
error_reporting(E_ERROR | E_PARSE );
function checkUser(){
	$key = 'example_key';
	$token =
	 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vZXhhbXBsZS5vcmciLCJhdWQiOiJodHRwOi8vZXhhbXBsZS5jb20iLCJpYXQiOjE3MjE1NDYzMjYsIm5iZiI6MTcyMTU0NjMyNiwiZXhwIjoxNzIxNTQ5OTI2LCJkYXRhIjoiNjY2NjY2In0.XeUqDPYWTbrUNcGVD0w0Yh-jzUpVzuH1tMfl7tUKNqw';
	$decode = JWT::decode($token,new key($key,'HS256'));
	return json($decode->data);
}